import numpy as np
import cv2

bg = cv2.imread('../data/img.png')
print(bg.shape)
img = cv2.imread('../data/example.png')
# for ele in np.nditer(img, op_flags=['readwrite']):
#     if ele == 0:
#         ele[...] = 255
img_01 = cv2.resize(img, (200, 200), interpolation=cv2.INTER_CUBIC)
# print(img_01.shape)
# black_white = np.ones((610, 1024, 3))
# black_white = black_white * 255
# print(black_white)
bg[410:, 824:, :] = img_01
# max_r = np.min(np.dstack((black_white[:, :, 0], bg[:, :, 0])), axis=2)
# max_g = np.min(np.dstack((black_white[:, :, 1], bg[:, :, 1])), axis=2)
# max_b = np.min(np.dstack((black_white[:, :, 2], bg[:, :, 2])), axis=2)
# add_bg_image = np.dstack((max_r, max_g, max_b))
cv2.imshow("result", bg)
cv2.waitKey(0)
